import { RouteRecordRaw } from 'vue-router';
import MainLayout from '@/layout/index.vue';
import EmptyLayout from '@/layout/empty.vue';
import CimupLayout from '@/layout/cimup.vue';

const routes: RouteRecordRaw = {
  path: '/scene',
  name: 'scene',
  redirect: '/scene/list',
  meta: {
    path: '/scene',
    title: '场景管理',
    icon: 'ic_changjing',
    layout: MainLayout,
  },
  component: EmptyLayout,
  children: [
    {
      path: 'list',
      name: 'sceneList',
      meta: {
        path: '/scene/list',
        title: '场景生成',
      },
      component: () => import('@/views/scene/list/index.vue'),
    },
    {
      path: 'detail/:id',
      name: 'sceneDetail',
      meta: {
        path: '/scene/detail',
        title: '场景生成',
        layout: CimupLayout,
        hidden: true,
      },
      component: () => import('@/views/scene/detail/index.vue'),
    },
    {
      path: 'preview/:id',
      name: 'scenePreview',
      meta: {
        path: '/scene/preview',
        title: '场景预览',
        layout: CimupLayout,
        hidden: true,
      },
      component: () => import('@/views/scene/detail/index.vue'),
    },
    {
      path: 'version/:id/:configid',
      name: 'sceneVersion',
      meta: {
        path: '/scene/version',
        title: '场景版本查看',
        layout: CimupLayout,
        hidden: true,
      },
      component: () => import('@/views/scene/version/index.vue'),
    },
    {
      path: 'share',
      name: 'sceneShare',
      meta: {
        path: '/scene/share',
        title: '场景分享',
      },
      component: () => import('@/views/scene/share/list/index.vue'),
    },
    // {
    //   path: 'download',
    //   name: 'sceneDownload',
    //   meta: {
    //     path: '/scene/download',
    //     title: '下载管理',
    //   },
    //   component: () => import('@/views/scene/download/index.vue'),
    // },
  ],
};

export default routes;
